package cn.iocoder.yudao.module.book.controller.app.lock.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 打卡新增/修改 Request VO")
@Data
public class AppCheckInSaveReqVO {

    @Schema(description = "打卡id", requiredMode = Schema.RequiredMode.REQUIRED, example = "6738")
    private Integer clockId;

    @Schema(description = "用户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31699")
    @NotNull(message = "用户id不能为空")
    private Long userId;

    @Schema(description = "绘本集合", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "绘本集合不能为空")
    private String bookList;

    @Schema(description = "内容", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "内容不能为空")
    private String content;

    @Schema(description = "天数", requiredMode = Schema.RequiredMode.REQUIRED, example = "30294")
    @NotNull(message = "天数不能为空")
    private Integer dayCount;
    
    @Schema(description = "打卡类型：1-学习打卡，2-班级打卡", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "打卡类型不能为空")
    private Integer checkInType;
    
    @Schema(description = "班级ID（班级打卡时必填）", example = "123")
    private Integer classId;

    @Schema(description = "时间", requiredMode = Schema.RequiredMode.REQUIRED)
//    @NotEmpty(message = "时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

}